<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>我的二维码</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="format-detection" content="telephone=no,email=no" />
		<link rel="stylesheet" href="../css/mui.min.css">
		<link rel="stylesheet" type="text/css" href="../css/mui.picker.min.css" />
		<link rel="stylesheet" href="../css/OA.css" />
		<style>
			.qr-wapper {
				width: 94%;
				background: #fff;
				height: 400px;
				margin: 0 3%;
				position: relative;
				border-radius: 5px;
			}
			
			#qrcode {
				position: absolute;
				top: 0;
				left: 0;
				right: 0;
				bottom: 0;
				margin: auto;
			}
			#startScan{width:80%;margin:auto;margin-top:20px;} 
		</style>
	</head>

	<body>
		<script src="../js/mui.min.js"></script>
		<script src="../js/mui.picker.min.js"></script>
		<script src="../js/qrcode.min.js"></script>
		<script src="../js/app.js"></script>
		<script type="text/javascript" charset="utf-8">
			//mui初始化
			mui.init();
			mui.plusReady(function(){
				var scan = null;
				document.getElementById('startScan').addEventListener('tap',function(){
					himall.openVW('scan-QR.html');
				});
				function onmarked(type,result){
					var text="未知";
					switch(type){
						case plus.barcode.QR:
							text="QR";
							break;
					}
					alert("条码类型"+text+"\n条码内容"+result);
				}	
			})
		</script>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">我的二维码</h1>
		</header> 
		<div class="mui-content transparent">
			<div class="space-line"></div>
			<div class="qr-wapper">
				<div id="qrcode" style="width:150px; height:150px; "></div>
			</div>
			<button type="button" class="mui-btn mui-btn-blue mui-btn-block" id="startScan">开始扫描</button>
		</div>
		<div id="statusbox"></div>
		<script>
			var qrcode = new QRCode(document.getElementById("qrcode"), {
				width: 150,
				height: 150
			});

			function makeCode() {

				qrcode.makeCode('我也不知道要写些什么');
			}

			makeCode();
		</script>
	</body>

</html>